#include <iostream>

using namespace std;

void triangle(ostream &outs, unsigned int m, unsigned int n)
{
	for (int i = 0; i < m; i++)
		outs << "*";
	cout << endl;

	if (m >= n)
	{
		for (int i = 0; i < m; i++)
			outs << "*";
		outs << endl;
		return;
	}
	else
	{
		triangle(outs, m + 1, n);
		for (int i = 0; i < m; i++)
			cout << "*";
		outs << endl;
	}
	

	return;
}

int main()
{
	triangle(cout, 3, 5);
	system("PAUSE");
	return 0;
}